// scss-lint:disable QualifyingElement

//
// Base styles
//

.btn {
  font-weight: $btn-font-weight;
  font-family: $font-family-poppins-first;
  border: $input-btn-border-width solid transparent;

  @include button-size(
    $btn-padding-y,
    $btn-padding-x,
    $btn-font-size,
    $input-btn-line-height,
    $btn-border-radius
  );

  @include transition($btn-transition);

  &:hover,
  &.hover {
    cursor: pointer;
  }

  &:focus,
  &.focus {
    @include box-shadow();
  }

  // Disabled comes first so active can properly restyle
  &.disabled,
  &:disabled {
    box-shadow: none;
  }

  //
  // Class modifiers
  //

  &.btn-squared {
    border-radius: 0;
  }

  &.btn-pill {
    border-radius: 50px;
  }
}


//
// Alternate buttons
//

@each $color, $value in $theme-colors {
  .btn-#{$color} {
    @include button-variant(
      $value,
      $value,
      0 4px 10px rgba($value, .25)
    );
  }
}

// White buttons
.btn-white {
  @include button-variant(
      $white,
      $white,
      0 4px 10px rgba($white, .25)
  );
}

// Black buttons
.btn-black {
  @include button-variant(
      $black,
      $black,
      0 4px 10px rgba($black, .25)
  );
}

@each $color, $value in $theme-colors {
  .btn-outline-#{$color} {
    @include button-outline-variant($value, #fff);
  }
}

// White outline buttons
.btn-outline-white {
  @include button-outline-variant($white, $white);
  color: $white;

  &:active {
    @include color-yiq($white);
  }
}

// Black outline buttons
.btn-outline-black {
  @include button-outline-variant($black, $black);
  color: $black;

  &:active {
    @include color-yiq($black);
  }
}


//
// Link buttons
//

// Make a button look and behave like a link
.btn-link {
  font-weight: $font-weight-normal;
  color: $link-color;

  @include hover-focus {
    color: $link-hover-color;
    text-decoration: $link-hover-decoration;
  }

  &:disabled {
    color: $btn-link-disabled-color;
  }
}


//
// Button Sizes
//

.btn-lg {
  @include button-size(
    $input-btn-padding-y-lg,
    $input-btn-padding-x-lg,
    $btn-font-size-lg,
    $line-height-lg,
    $btn-border-radius-lg
  );
}

.btn-sm {
  @include button-size(
    $input-btn-padding-y-sm,
    $input-btn-padding-x-sm,
    $btn-font-size-sm,
    $line-height-sm,
    $btn-border-radius-sm
  );
}


//
// Block button
//

// Vertically space out multiple block buttons
.btn-block + .btn-block {
  margin-top: $btn-block-spacing-y;
}
